﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NET6.Infrastructure.Tools
{
    public static class BuilderExtensions
    {
        public static ServiceProvider ServiceProvider { get; set; }
        public static WebApplicationBuilder AddServiceProvider(this WebApplicationBuilder builder)
        {
            builder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
            ServiceProvider = builder.Services.BuildServiceProvider();
            return builder;
        }
    }
}
